package com.yusys.jin.blog.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yusys.jin.blog.entity.GameRole;

public interface GameRoleMapper {
    /**
     * 向数据库添加角色数据
     *
     * @param role
     */
    Integer insertGameRole(GameRole role);

    /**
     * 根据用户名查询角色
     *
     * @param uid
     * @return
     */
    List<GameRole> queryRoles(Integer uid);

    /**
     * 通过服务器名和角色名查询角色
     *
     * @param RoleName
     * @param ServerCD
     * @return
     */
    GameRole queryRoleByNameAndServerCD(@Param(value = "roleName") String RoleName,
                                        @Param(value = "serverCD") String ServerCD
    );
}
